import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
    mode: "hash",
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            name: "默认路径",
            redirect: "/Login",
            component: import("@/views/Login.vue"),
        },
        {
            path: "/Login",
            name: "登录",
            component: () => import("@/views/Login.vue"),
        },
        {
            path: "/Main",
            name: "主页",
            component: () => import("@/views/Main.vue"),
            children: [
                {
                    name: "申请出差行程",
                    path: "/travel/ApplyForTravel",
                    component: () =>
                        import("@/views/travel/ApplyForTravel.vue"),
                },
                {
                    name: "查看出差规章制度",
                    path: "/travel/TravelStandards",
                    component: () =>
                        import("@/views/travel/TravelStandards.vue"),
                },
                {
                    name: "规划出差行程",
                    path: "/travel/Scheduling",
                    component: () =>
                        import("@/views/travel/Scheduling.vue"),
                },
                {
                    name: "添加行程",
                    path: "/travel/AddSchedule",
                    component: () =>
                        import("@/views/travel/AddSchedule.vue"),
                },
                {
                    name: "编辑行程",
                    path: "/travel/EditSchedule",
                    component: () =>
                        import("@/views/travel/EditSchedule.vue"),
                },
                {
                    name: "提交预算申请",
                    path: "/travel/BudgetRequest",
                    component: () =>
                        import("@/views/travel/BudgetRequest.vue"),
                },
                {
                    name: "申请出差成功",
                    path: "/travel/ApplySuccess",
                    component: () =>
                        import("@/views/travel/ApplySuccess.vue"),
                },
                {
                    name: "查看出差流程",
                    path: "/travel/TravelProcess",
                    component: () =>
                        import("@/views/travel/TravelProcess.vue"),
                },
                {
                    path: "/manager/ApproveTravel",
                    name: "经理审批出差申请",
                    component: () =>
                        import("@/views/manager/ApproveTravel.vue"),
                },
                {
                    path: "/manager/ApproveTravelRecord",
                    name: "经理审批出差申请记录",
                    component: () =>
                        import("@/views/manager/ApproveTravelRecord.vue"),
                },
                {
                    name: "经理审批报销申请",
                    path: "/manager/ApproveReimbursement",
                    component: () =>
                        import("@/views/manager/ApproveReimbursement.vue"),
                },
                {
                    name: "经理审批报销申请记录",
                    path: "/manager/ApproveReimbursementRecord",
                    component: () =>
                        import("@/views/manager/ApproveReimbursementRecord.vue"),
                },
                {
                    name: "财务人员审批预支款申请",
                    path: "/financialStaff/ApproveAdvancePayment",
                    component: () =>
                        import("@/views/financialStaff/ApproveAdvancePayment.vue"),
                },
                {
                    name: "财务人员审批预支款申请记录",
                    path: "/financialStaff/ApproveAdvancePaymentRecord",
                    component: () =>
                        import("@/views/financialStaff/ApproveAdvancePaymentRecord.vue"),
                },
                {
                    name: "财务人员处理预支款",
                    path: "/financialStaff/HandleAdvancePayment",
                    component: () =>
                        import(
                            "@/views/financialStaff/HandleAdvancePayment.vue"
                        ),
                },
                {
                    name: "财务人员处理预支款记录",
                    path: "/financialStaff/HandleAdvancePaymentRecord",
                    component: () =>
                        import(
                            "@/views/financialStaff/HandleAdvancePaymentRecord.vue"
                        ),
                },
                {
                    name: "财务人员审批报销申请",
                    path: "/financialStaff/ApproveReimbursement",
                    component: () =>
                        import(
                            "@/views/financialStaff/ApproveReimbursement.vue"
                        ),
                },
                {
                    name: "财务人员审批报销申请记录",
                    path: "/financialStaff/ApproveReimbursementRecord",
                    component: () =>
                        import(
                            "@/views/financialStaff/ApproveReimbursementRecord.vue"
                        ),
                },
                {
                    name: "财务人员处理报销款",
                    path: "/financialStaff/HandleReimbursement",
                    component: () =>
                        import(
                            "@/views/financialStaff/HandleReimbursement.vue"
                        ),
                },
                {
                    name: "财务人员处理报销款记录",
                    path: "/financialStaff/HandleReimbursementRecord",
                    component: () =>
                        import(
                            "@/views/financialStaff/HandleReimbursementRecord.vue"
                        ),
                },
                {
                    name: "员工提交报销表",
                    path: "/Reimbursement/SubmitReimbursement",
                    component: () =>
                        import(
                            "@/views/Reimbursement/SubmitReimbursement.vue"
                        ),
                },
                {
                    name: "员工选择出差编号进行报销",
                    path: "/Reimbursement/NeedReimbursement",
                    component: () =>
                        import(
                            "@/views/Reimbursement/NeedReimbursement.vue"
                            ),
                },
                {
                    name: "员工报销申请成功",
                    path: "/Reimbursement/ApplyReimbursementSuccess",
                    component: () =>
                        import(
                            "@/views/Reimbursement/ApplyReimbursementSuccess.vue"
                            ),
                },
                {
                    name: "修改个人信息",
                    path: "/User/UpdateUserInfo",
                    component: () =>
                        import(
                            "@/views/User/UpdateUserInfo.vue"
                            ),

                },
                {
                    name: "财务人员查看报表",
                    path: "/report/ViewReport",
                    component:() =>
                        import(
                            "@/views/report/ViewReport.vue"
                        ),
                },
            ],
        },
    ],
});

export default router;
